package com.bjb.vr.common.mapper;

import com.bjb.vr.common.dto.ResDevice;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.yulichang.base.MPJBaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author admin
* @description 针对表【res_device(设备表)】的数据库操作Mapper
* @createDate 2022-08-11 15:22:26
* @Entity com.bjb.vr.common.dto.ResDevice
*/
public interface ResDeviceMapper extends BaseMapper<ResDevice> , MPJBaseMapper<ResDevice> {

    void initDeviceClassLoadStateByGroupCode(String groupCode,long contentId,int loadState,String loadMsg );

    void batchUpdateResDeviceSysUpdateId(@Param("groupCode") String groupCode,@Param("sysUpdateId") Long sysUpdateId,@Param("tenantId") String tenantId);

    void updateResDeviceSysUpdateId(@Param("groupCode") String groupCode,@Param("sysUpdateId") Long sysUpdateId,@Param("tenantId") String tenantId,@Param("udid") String udid);

    void batchUpdateFailResDeviceApkNeedUpdateState(@Param("groupCode") String groupCode,@Param("apkNeedUpdateState") int apkNeedUpdateState,@Param("tenantId") String tenantId);

    void initDeviceUpdateBundleStateByGroupCode(String groupCode,long bundleId,int updateBundleState,String updateBundleMsg );

    List<ResDevice> queryDeviceInfoAndGroup(@Param("groupId")Long groupId, @Param("onlineState")Integer onlineState, @Param("mode")Integer mode, @Param("battery")Integer battery, @Param("remainMem")Integer remainMem, @Param("current")Long current, @Param("size")Long size);


    int updateResDeviceBatch(@Param("list") List<ResDevice> list);



}




